package com.timesheet.server.core.util;

import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.cfg.AnnotationConfiguration;

public class HibernateUtil {

	public Session getSession() {

		Session session = new AnnotationConfiguration().configure().buildSessionFactory().openSession();
		return session;
	}

	public Transaction getTransaction() {
		return getSession().getTransaction();
	}

}
